package com.tio.showcase.server;

import com.tio.showcase.common.Const;
import org.tio.server.AioServer;
import org.tio.server.ServerGroupContext;
import org.tio.server.intf.ServerAioHandler;
import org.tio.server.intf.ServerAioListener;

/**
 * Author      : liyuemin
 * Time        : 2017/12/15 17:30
 * Description :
 */
public class ShowcaseServerStarter {

    static ServerAioHandler aioHandler = new ShowcaseServerAioHandler();
    static ServerAioListener aioListener = new ShowcaseServerAioListener();
    static ServerGroupContext serverGroupContext = new ServerGroupContext(aioHandler,aioListener);
    static AioServer aioServer = new AioServer(serverGroupContext);
    static String serverIp = null;
    static int serverPort = Const.PORT;

    public static void main(String [] args ) throws  Exception{
        aioServer.start(serverIp,serverPort);

    }
}
